import Vue from 'vue'
import VueRouter from 'vue-router'
import HomeView from '../views/HomeView.vue'
import Login from "@/components/Login";
import ProviderManager from "@/components/ProviderManager";
import ProviderSave from "@/components/ProviderSave";
import ProviderShow from "@/components/ProviderShow";
import ProviderUpdate from "@/components/ProviderUpdate";
import UserManager from "@/components/UserManager";
import UserShow from "@/components/UserShow";
import UserSave from "@/components/UserSave";
import UserUpdate from "@/components/UserUpdate";
import UserUpdatePassword from "@/components/UserUpdatePassword";
import Index from '@/components/Index'
import ShowCart from "@/components/ShowCart";
import Order from '@/components/Order'

Vue.use(VueRouter)

const routes = [
    {
        path: '/home',
        name: 'home',
        component: HomeView
    },
    {
        path: '/login',
        name: 'login',
        component: Login
    },
    {
        path: '/providerManager',
        name: 'providerManager',
        component: ProviderManager
    },
    {
        path: '/providerSave',
        name: 'providerSave',
        component: ProviderSave
    },
    {
        path: '/providerShow',
        name: 'providerShow',
        component: ProviderShow
    },
    {
        path: '/providerUpdate',
        name: 'providerUpdate',
        component: ProviderUpdate
    },
    {
        path: '/userManager',
        name: 'userManager',
        component: UserManager
    },
    {
        path: '/userShow',
        name: 'userShow',
        component: UserShow
    },
    {
        path: '/userSave/:pages/:total',
        name: 'userSave',
        component: UserSave
    },
    {
        path: '/userUpdate/:id',
        name: 'userUpdate',
        component: UserUpdate
    },
    {
        path: '/changePassword',
        name: 'changePassword',
        component: UserUpdatePassword
    },
    {
        path:'/',
        name:'index',
        component: Index
    },
    {
        path:'/showCart',
        name:'showCart',
        component: ShowCart
    },
    {
        path:'/order',
        name:'order',
        component: Order
    }
]

const router = new VueRouter({
    routes
})

export default router
